const shortcutsLayterThreeMonth = [{
  text: '今天',
  onClick(picker) {
    const current = new Date();
    const time = (current.getHours() * 60 * 60 + current.getMinutes() * 60 + current.getSeconds()) * 1000;
    const start = new Date(current.getTime() - time);
    picker.$emit('pick', [start, current]);
  }
}, {
  text: '昨天',
  onClick(picker) {
    const current = new Date();
    const time = (current.getHours() * 60 * 60 + current.getMinutes() * 60 + current.getSeconds()) * 1000;
    const start = current.getTime() - time - 8.64e7;
    const end = start + 8.64e7 - 1000;
    picker.$emit('pick', [new Date(start), new Date(end)]);
  }
}, {
  text: '最近一周',
  onClick(picker) {
    const current = new Date();
    const start = new Date();
    start.setDate(start.getDate() - 6);
    picker.$emit('pick', [start, current]);
  }
}, {
  text: '最近一个月',
  onClick(picker) {
    const current = new Date();
    const start = new Date();
    start.setMonth(start.getMonth() - 1);
    picker.$emit('pick', [start, current]);
  }
}, {
  text: '最近三个月',
  onClick(picker) {
    const current = new Date();
    const start = new Date();
    start.setMonth(start.getMonth() - 3);
    picker.$emit('pick', [start, current]);
  }
}];

export {
  shortcutsLayterThreeMonth
}
